﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Host.Domain
{
    /// <summary>
    /// 操作日志表
    /// </summary>
    public  class OperationLogs
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [Key]
        public int LogId { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 设备外键
        /// </summary>
        public int DeviceId { get; set; }
        /// <summary>
        /// 执行的操作 "Turn On", "Turn Off"
        /// </summary>
        public string Action { get; set; }
        /// <summary>
        /// 操作发生的时间
        /// </summary>
        public DateTime LogTimestamp { get; set; }
        /// <summary>
        /// 操作是否成功执行
        /// </summary>
        public bool LogIsSuccess { get; set; }
    } 
}
